package com.qdxwx.data.mapper.picture;

import com.qdxwx.common.page.PageRequest;
import com.qdxwx.models.picture.PictureAlbum;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
@Repository
public interface PictureAlbumMapper {

    int insert(PictureAlbum pictureAlbum);

    PictureAlbum selectById(int id);

    PictureAlbum selectByPictureId(int pictureId);

    List<PictureAlbum> selectList(@Param("e") PictureAlbum pictureAlbum, @Param("page") PageRequest page);

    int count(@Param("e") PictureAlbum pictureAlbum);

    int update(PictureAlbum pictureAlbum);

    int deleteById(int id);

    int updateView(int id);

    int insertItem(int albumId, int pictureId);

    int countItem(int albumId);

    int deleteItem(int albumId, int pictureId);

    int deleteItemByAlbumId(int albumId);

    int deleteItemByPictureId(int pictureId);

    List<Integer> selectAlbumIdsByPictureId(int pictureId);
}
